import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/user/app/getPageAppList',
    method: 'post',
    data: query
  })
}

export function getUcAppList(query) {
  return request({
    url: '/api/user/app/getUcAppList',
    method: 'post',
    data: query
  })
}

export function fetchArticle(id) {
  return request({
    url: '/article/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/article/pv',
    method: 'get',
    params: { pv }
  })
}

export function createUcApp(data) {
  return request({
    url: '/api/user/app/saveUcApp',
    method: 'post',
    data: data
  })
}

export function updateUcApp(data) {
  return request({
    url: '/api/user/app/updateUcApp',
    method: 'post',
    data: data
  })
}
